package com.itheima.health.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.health.dao.MemberDao;
import com.itheima.health.pojo.Member;
import com.itheima.health.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Author: HuChunping
 * @Date: 2021/01/18
 **/
@Service(interfaceClass = MemberService.class)
public class MemberServiceImpl implements MemberService {
    @Autowired
    private MemberDao memberDao;

    /**
     * 手机号查找会员
     * @Author: HuChunping
     * @Date: 2021/1/18 10:33
     * @param telephone:
     * @return: com.itheima.health.pojo.Member
     **/
    @Override
    public Member findByPhone(String telephone) {
        Member member = memberDao.findByTelephone(telephone);
        return member;
    }

    /**
     * 添加会员
     * @Author: HuChunping
     * @Date: 2021/1/18 10:35
     * @param newMember:
     * @return: void
     **/
    @Override
    public void add(Member newMember) {
        memberDao.add(newMember);
    }
}
